<?php

/**
 * Created by PhpStorm.
 * User: 刚
 * Date: 2017/8/1
 * Time: 17:43
 */
class Book
{
    private $author;
    private $title;

    function __construct($title_in, $author_in)
    {
        $this->author = $author_in;
        $this->title = $title_in;
    }

    function getAuthor()
    {
        return $this->author;
    }

    function getTitle()
    {
        return $this->title;
    }

    function getAuthorAndTitle()
    {
        return $this->getTitle() . 'by' . $this->getAuthor();
    }
}